import Vue from 'vue'
import VueRouter from 'vue-router'
import TR from '../06zuoye/routerr/Router.vue'
Vue.use(VueRouter)

const routes = [
  {
    path:'/t',
    name:'t',
    component:TR
  },
  {
    path:'/login',
    name:'login',
    component:()=>import('../07zuoye/one-login/login.vue')
  },
  {
    path:'/home',
    name:'home1',
    component:()=>import('../07zuoye/one-login/home.vue'),
    // redirect:'/home/first',
    children:[
      {
        path:'first',
        name:'first',
        component:()=>import('../07zuoye/one-login/main/first.vue'),
        redirect:'/home/first/page1',
        children:[
          {
            path:'page1',
            name:'page1',
            component:()=>import('../07zuoye/one-login/main/first-more/page1.vue')
          },
          {
            path:'page2',
            name:'page2',
            component:()=>import('../07zuoye/one-login/main/first-more/page2.vue')
          }
        ]
      },
      {
        path:'second',
        name:'second',
        component:()=>import('../07zuoye/one-login/main/second.vue')
      },
      {
        path:'third/:params',
        name:'third',
        component:()=>import('../07zuoye/one-login/main/third.vue')
      },
      {
        path:'fourth/:params',
        name:'fourth',
        component:()=>import('../07zuoye/one-login/main/fourth.vue')
      }
    ]
  },
{
  path:'*',
  name:'404',
  component:()=>import('../404NotFound.vue')
}
]

const router = new VueRouter({
  mode:'hash',
  routes
})

export default router
